package com.yangmao.service.impl;

import com.github.pagehelper.PageHelper;
import com.yangmao.dao.StudentDiseasesDao;
import com.yangmao.entity.StudentDiseases;
import com.yangmao.service.api.StudentDiseasesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘洋毛’
 * @version 1.0
 * @description: TODO
 * @date 2022/1/11 17:30
 */
@Service
public class StudentDiseasesImpl implements StudentDiseasesService {
    @Autowired
    private StudentDiseasesDao StudentDiseasesdao;

    @Override
    public List<StudentDiseases> getAllStudentDiseases(int page, int size) {
        PageHelper.startPage(page,size);
        return StudentDiseasesdao.getAllStudentDiseases();
    }

    @Override
    public void updateStudentDiseases(StudentDiseases StudentDiseases) {
        StudentDiseasesdao.updateStudentDiseases(StudentDiseases);
    }

    @Override
    public void deleteStudentDiseases(String id) {
        StudentDiseasesdao.deleteStudentDiseases(id);
    }

    @Override
    public void addStudentDiseases(StudentDiseases StudentDiseases) {
        StudentDiseasesdao.addStudentDiseases(StudentDiseases);
    }

    @Override
    public StudentDiseases getStudentDiseasesById(String id) {
        return StudentDiseasesdao.getStudentDiseasesById(id);
    }
}
